import 'package:xiongan_app_yy/entrys/rp/car_info_list_entity.dart';

class InvListEntity {
  List<InvListData> datas;

  InvListEntity({this.datas});

  InvListEntity.fromJson(List<dynamic> json) {
    if (json != null) {
      datas = new List<InvListData>();
      (json as List).forEach((v) {
        datas.add(new InvListData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['datas'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class InvListData {
  String creatorUserId;
  dynamic biddingbatchid;
  String creationTime;
  String lastModificationTime;
  dynamic remark;
  dynamic deliverydate;
  String supplyname;
  dynamic total;
  bool isDeleted;
  dynamic projectCode;
  String warehouseid;
  String id;
  String state;
  dynamic projectid;
  String erpno;
  dynamic appointmentmode;
  String projectname;
  dynamic supplierid;
  List<InvListDatasTaskdetaillist> taskDetailList;
  String lastModifierUserId;
  dynamic appointmentmodename;
  String applytime;
  String projectno;
  dynamic biddingbatches;
  String driver;
  String carno;
  String phone;
  dynamic warehouseInTime;
  String tenantId;
  String taskno;
  List<InvListDatasImglist> imgList;
  String destination;
  List<CarInfoListItem> carList;

  InvListData(
      {this.creatorUserId,
      this.biddingbatchid,
      this.creationTime,
      this.lastModificationTime,
      this.remark,
      this.deliverydate,
      this.supplyname,
      this.total,
      this.isDeleted,
      this.projectCode,
      this.warehouseid,
      this.id,
      this.state,
      this.projectid,
      this.erpno,
      this.appointmentmode,
      this.projectname,
      this.supplierid,
      this.taskDetailList,
      this.lastModifierUserId,
      this.appointmentmodename,
      this.applytime,
      this.projectno,
      this.biddingbatches,
      this.driver,
      this.carno,
      this.phone,
      this.warehouseInTime,
      this.tenantId,
      this.taskno,
      this.imgList,
      this.destination,
      this.carList});

  InvListData.fromJson(Map<String, dynamic> json) {
    creatorUserId = json['creatorUserId'];
    biddingbatchid = json['biddingbatchid'];
    creationTime = json['creationTime'];
    lastModificationTime = json['lastModificationTime'];
    remark = json['remark'];
    deliverydate = json['deliverydate'];
    supplyname = json['supplyname'];
    total = json['total'];
    isDeleted = json['isDeleted'];
    projectCode = json['projectCode'];
    warehouseid = json['warehouseid'];
    id = json['id'];
    state = json['state'];
    projectid = json['projectid'];
    erpno = json['erpno'];
    appointmentmode = json['appointmentmode'];
    projectname = json['projectname'];
    supplierid = json['supplierid'];
    if (json['taskDetailList'] != null) {
      taskDetailList = new List<InvListDatasTaskdetaillist>();
      (json['taskDetailList'] as List).forEach((v) {
        taskDetailList.add(new InvListDatasTaskdetaillist.fromJson(v));
      });
    }
    lastModifierUserId = json['lastModifierUserId'];
    appointmentmodename = json['appointmentmodename'];
    applytime = json['applytime'];
    projectno = json['projectno'];
    biddingbatches = json['biddingbatches'];
    driver = json['driver'];
    carno = json['carno'];
    phone = json['phone'];
    warehouseInTime = json['warehouseInTime'];
    tenantId = json['tenantId'];
    taskno = json['taskno'];
    destination = json['destination'];
    carList = json['carList'];
    if (json['imgList'] != null) {
      imgList = new List<InvListDatasImglist>();
      (json['imgList'] as List).forEach((v) {
        imgList.add(new InvListDatasImglist.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['creatorUserId'] = this.creatorUserId;
    data['biddingbatchid'] = this.biddingbatchid;
    data['creationTime'] = this.creationTime;
    data['lastModificationTime'] = this.lastModificationTime;
    data['remark'] = this.remark;
    data['deliverydate'] = this.deliverydate;
    data['supplyname'] = this.supplyname;
    data['total'] = this.total;
    data['isDeleted'] = this.isDeleted;
    data['projectCode'] = this.projectCode;
    data['warehouseid'] = this.warehouseid;
    data['id'] = this.id;
    data['state'] = this.state;
    data['projectid'] = this.projectid;
    data['erpno'] = this.erpno;
    data['appointmentmode'] = this.appointmentmode;
    data['projectname'] = this.projectname;
    data['supplierid'] = this.supplierid;
    if (this.taskDetailList != null) {
      data['taskDetailList'] =
          this.taskDetailList.map((v) => v.toJson()).toList();
    }
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['appointmentmodename'] = this.appointmentmodename;
    data['applytime'] = this.applytime;
    data['projectno'] = this.projectno;
    data['biddingbatches'] = this.biddingbatches;
    data['driver'] = this.driver;
    data['carno'] = this.carno;
    data['phone'] = this.phone;
    data['warehouseInTime'] = this.warehouseInTime;
    data['tenantId'] = this.tenantId;
    data['taskno'] = this.taskno;
    data['destination'] = this.destination;
    data['carList'] = this.carList;
    if (this.imgList != null) {
      data['imgList'] = this.imgList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class InvListDatasTaskdetaillist {
  String productbigname;
  String batchno;
  String creatorUserId;
  String productcode;
  String materialname;
  String creationTime;
  String lastModificationTime;
  String productsimname;
  String remark;
  String materialid;
  bool isDeleted;
  String warehouseid;
  String productmidcode;
  String id;
  String taskid;
  String productsimcode;
  int recqty;
  int amount;
  String lastModifierUserId;
  String productbigcode;
  String erpdetailid;
  String productmidname;
  int qty;
  String tenantId;
  String materialcode;
  String baseuintname;

  InvListDatasTaskdetaillist(
      {this.productbigname,
      this.batchno,
      this.creatorUserId,
      this.productcode,
      this.materialname,
      this.creationTime,
      this.lastModificationTime,
      this.productsimname,
      this.remark,
      this.materialid,
      this.isDeleted,
      this.warehouseid,
      this.productmidcode,
      this.id,
      this.taskid,
      this.productsimcode,
      this.recqty,
      this.amount,
      this.lastModifierUserId,
      this.productbigcode,
      this.erpdetailid,
      this.productmidname,
      this.qty,
      this.tenantId,
      this.materialcode,
      this.baseuintname});

  InvListDatasTaskdetaillist.fromJson(Map<String, dynamic> json) {
    productbigname = json['productbigname'];
    batchno = json['batchno'];
    creatorUserId = json['creatorUserId'];
    productcode = json['productcode'];
    materialname = json['materialname'];
    creationTime = json['creationTime'];
    lastModificationTime = json['lastModificationTime'];
    productsimname = json['productsimname'];
    remark = json['remark'];
    materialid = json['materialid'];
    isDeleted = json['isDeleted'];
    warehouseid = json['warehouseid'];
    productmidcode = json['productmidcode'];
    id = json['id'];
    taskid = json['taskid'];
    productsimcode = json['productsimcode'];
    recqty = json['recqty'];
    amount = json['amount'];
    lastModifierUserId = json['lastModifierUserId'];
    productbigcode = json['productbigcode'];
    erpdetailid = json['erpdetailid'];
    productmidname = json['productmidname'];
    qty = json['qty'];
    tenantId = json['tenantId'];
    materialcode = json['materialcode'];
    baseuintname = json['baseuintname'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['productbigname'] = this.productbigname;
    data['batchno'] = this.batchno;
    data['creatorUserId'] = this.creatorUserId;
    data['productcode'] = this.productcode;
    data['materialname'] = this.materialname;
    data['creationTime'] = this.creationTime;
    data['lastModificationTime'] = this.lastModificationTime;
    data['productsimname'] = this.productsimname;
    data['remark'] = this.remark;
    data['materialid'] = this.materialid;
    data['isDeleted'] = this.isDeleted;
    data['warehouseid'] = this.warehouseid;
    data['productmidcode'] = this.productmidcode;
    data['id'] = this.id;
    data['taskid'] = this.taskid;
    data['productsimcode'] = this.productsimcode;
    data['recqty'] = this.recqty;
    data['amount'] = this.amount;
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['productbigcode'] = this.productbigcode;
    data['erpdetailid'] = this.erpdetailid;
    data['productmidname'] = this.productmidname;
    data['qty'] = this.qty;
    data['tenantId'] = this.tenantId;
    data['materialcode'] = this.materialcode;
    data['baseuintname'] = this.baseuintname;
    return data;
  }
}

class InvListDatasImglist {
  String creatorUserId;
  String imgname;
  String imgstr;
  String creationTime;
  bool isDeleted;
  String lastModificationTime;
  String lastModifierUserId;
  String tenantId;
  String id;
  String imgtype;
  String taskid;

  InvListDatasImglist(
      {this.creatorUserId,
      this.imgname,
      this.imgstr,
      this.creationTime,
      this.isDeleted,
      this.lastModificationTime,
      this.lastModifierUserId,
      this.tenantId,
      this.id,
      this.imgtype,
      this.taskid});

  InvListDatasImglist.fromJson(Map<String, dynamic> json) {
    creatorUserId = json['creatorUserId'];
    imgname = json['imgname'];
    imgstr = json['imgstr'];
    creationTime = json['creationTime'];
    isDeleted = json['isDeleted'];
    lastModificationTime = json['lastModificationTime'];
    lastModifierUserId = json['lastModifierUserId'];
    tenantId = json['tenantId'];
    id = json['id'];
    imgtype = json['imgtype'];
    taskid = json['taskid'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['creatorUserId'] = this.creatorUserId;
    data['imgname'] = this.imgname;
    data['imgstr'] = this.imgstr;
    data['creationTime'] = this.creationTime;
    data['isDeleted'] = this.isDeleted;
    data['lastModificationTime'] = this.lastModificationTime;
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['tenantId'] = this.tenantId;
    data['id'] = this.id;
    data['imgtype'] = this.imgtype;
    data['taskid'] = this.taskid;
    return data;
  }
}
